package com.pdg.mcplugin.simpleconomy;

import com.pdg.mcplugin.common.baseclasses.PluginClientBase;

public class ConfigurationManager extends PluginClientBase<SimplEconomy> {

	private static final String ENABLED_PATH = "enabled";
	private static final boolean ENABLED_DEFAULT = true;
	private static final String PLURAL_PATH = "plural";
	private static final String PLURAL_DEFAULT = "dollars";
	private static final String SINGULAR_PATH = "singular";
	private static final String SINGULAR_DEFAULT = "dollar";
	private static final String FORMAT_PATH = "format";
	private static final String FORMAT_DEFAULT = "$%.2f";
	private static final String FRACTIONAL_DIGITS_PATH = "fractionalDigits";
	private static final int FRACTIONAL_DIGITS_DEFAULT = 2;
	private static final String COMMAND_DEFAULT = "money";
	private static final String COMMAND_PATH = "command";
	private static final String INITIAL_AMOUNT_PATH = "initialAmount";
	private static final double INITIAL_AMOUNT_DEFAULT = 0;
	
	
	public ConfigurationManager(SimplEconomy thePlugin) {
		super(thePlugin);
	}
	
	public boolean isEnabled(){
		return getPlugin().getConfig().getBoolean(ENABLED_PATH,ENABLED_DEFAULT);
	}
	
	public String getPlural(){
		return getPlugin().getConfig().getString(PLURAL_PATH,PLURAL_DEFAULT);
	}
	public String getSingular(){
		return getPlugin().getConfig().getString(SINGULAR_PATH,SINGULAR_DEFAULT);
	}
	public String getFormat(){
		return getPlugin().getConfig().getString(FORMAT_PATH,FORMAT_DEFAULT);
	}
	public int getFractionalDigits(){
		return getPlugin().getConfig().getInt(FRACTIONAL_DIGITS_PATH,FRACTIONAL_DIGITS_DEFAULT);
	}
	public String getCommand(){
		return getPlugin().getConfig().getString(COMMAND_PATH,COMMAND_DEFAULT);
	}
	public double getInitialAmount(){
		return getPlugin().getConfig().getDouble(INITIAL_AMOUNT_PATH,INITIAL_AMOUNT_DEFAULT);
	}

}
